package com.cwj.demo.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

@Service
public class DemoListener implements ApplicationListener<DemoEvent> {

    @Override
    public void onApplicationEvent(DemoEvent demoEvent) {
        String channel = demoEvent.getChannel();
        System.out.println("进入监听事件:"+channel);
    }
}
